<style type="text/css">
    @media (max-width: 375px) {
        .edit-form tr td input{width:100%;}
        .edit-form tr th:first-child,.edit-form tr td:first-child{
            width:20%;
        }
        .edit-form tr th:last-child,.edit-form tr td:last-child{
            display: none;
        }
    }
</style>
<div class="panel panel-default panel-intro">
    <div class="panel-heading">
        <div class="panel-lead">{:__('remind')}</div>
        {:build_heading()}
        <ul class="nav nav-tabs">
            {foreach $configs as $group => $config}
            <li class="{$nav == $group ? 'active' : ''}"><a href="#{$group}" data-toggle="tab">{:__($group)}</a></li>
            {/foreach}
        </ul>
    </div>

    <div class="panel-body">
        <form class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="">
            <div id="myTabContent" class="tab-content">
            {foreach $configs as $group => $config}
            <div class="tab-pane fade {$group == $nav ? 'active in' : ''}" id="{$group}">
                <div class="widget-body no-padding">
                        <table class="table table-striped">
                            <tbody>
                                {foreach $config AS $var => $conf}
                                <tr>
                                    <td width="20%">{:__($var)}</td>
                                    <td>
                                        <div class="row">
                                            <div class="col-sm-8 col-xs-12">
                                                {if condition="$var eq 'img'"}
                                                <div class="input-group">
                                                    <input type="text" name="row[{$group}][{$var}]" value="{$conf}" id="row_input_{$group}_{$var}" class="form-control" />
                                                    <!--<button id="plupload-local" class="btn btn-primary plupload" data-after-upload="changeimg" data-input-id="c-logo" data-url="{:url('attachment/attachment/upload',['folder'=>'live'])}" data-multiple="false" data-preview-id="logo"><i class="fa fa-upload"></i> {:__("upload_img")}</button>-->
                                                    <span class="btn btn-default input-group-addon plupload"
                                                          id="upload_{$group}_{$var}"
                                                          data-url="{:url('attachment/attachment/upload',['folder'=>'wechat'])}"
                                                          data-multiple="false"
                                                          data-input-id="row_input_{$group}_{$var}"
                                                          data-preview-id="row_preview_{$group}_{$var}">
                                                        {:__("upload_img")}</span>
                                                </div>
                                                <div id="row_preview_{$group}_{$var}"></div>
                                                {else}
                                                <input type="text" name="row[{$group}][{$var}]" value="{$conf}" class="form-control" />
                                                {/if}
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                {/foreach}
                            </tbody>
                        </table>
                </div>
            </div>
            {/foreach}
        </div>
        <div>
            <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
        </form>
    </div>
</div>
